package oj.util.swing;

import java.awt.Image;
import java.awt.Toolkit;

import javax.swing.ImageIcon;

public class OJUtilSwing {

	public ImageIcon getImage(int iconSize, String icono) {

		/** Cargo las imagenes */
		Image imgOpen = Toolkit.getDefaultToolkit().getImage(
				getClass().getResource("/oj/swing/iconos/" + icono));

		ImageIcon icon = new ImageIcon(imgOpen.getScaledInstance(iconSize,
				iconSize, Image.SCALE_SMOOTH));

		return icon;
	}

}
